label encode one column pandas

29

from sklearn import preprocessing
le = preprocessing.LabelEncoder()
df['label'] = le.fit_transform(df['label'])

Comments

Submit
0 Comments